<?php 

include "scripts/connectDB.php";

$res = mysql_query("SELECT * FROM wepons ORDER BY wep_id ASC")
or die("Invalid query: " . mysql_query());
echo '<select name="wep_id">';
echo '<option value="wep_id">Velg wep</option>';

while ($row = mysql_fetch_assoc($res)) {
$wep_id = $row['wep_id'];
$weapon = $row['weapon'];
echo "<option value='$wep_id'>$weapon</option>";
}
echo '</select>';
?>

